package org.opensource.extfaces.tags;

import java.util.Stack;

public class TagStack {
	private static Stack<String> stack=new Stack<String>();
	public static void addTag(String tag){
		stack.push(tag);
	}
	public static boolean check(String tag){
		if(stack.isEmpty()){
			stack.push(tag);
			return true;
		}
		else{
			stack.push(tag);
			return false;
		}
	
	}
	public static void removeTag(String tag){
		if(tag.equals(stack.peek())){
			stack.pop();
		}
	}
}
